using System;
using System.Net;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RestUpMVC.Results;
using RestUpMVC.Test.TestClasses;

namespace RestUpMVC.Test.Results
{
    [TestClass]
    public class RestResultTest
    {
        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void Constructor_ShouldThrowAnExceptionIfTheResourceIsNull()
        {
            new RestResult(HttpStatusCode.Continue, null);
        }

        [TestMethod]
        public void StatusCode_ShouldReturnTheCorrectStatusCode()
        {
            var result = new RestResult(HttpStatusCode.OK, new TestRepresentation());
            Assert.AreEqual(HttpStatusCode.OK, result.StatusCode);
        }
    }
}